<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8' />
        <title>CSS样式</title>
        <meta name='keywords' content=''  />
        <meta name='description' content='' />
        <style>
            div.c1{
                width:300px;height:300px;
                background-image:url('./images/yutang.jpg');
                background-size:300px 300px; /*设置背景图片的大小*/
            }
            div.c1:hover{
                background-image:url('./images/3.jpg');
            }
            div.c2{
                width:60px;height:60px;
                background-image:url('./images/tag.jpg');
                background-position:-168px -8px;
            }
            div.c2:hover{
                background-position:-481px -12px;
            }
        </style>
    </head>
    <body>
        <h2>CSS样式实例:背景图片替换</h2>
        <div class='c1'></div>
        <div class='c2'></div>
    </body>
</html>